import QtQuick 2.0
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3

Item {

    property color majorColor: "#44fdfd"
    signal qmlSN_toP3promotion()
    signal qmlSN_sqlWriteFinish()
    onQmlSN_sqlWriteFinish: {
        if(!focus && $sqlMcRecorder.qml_getRefurbishFlag()) return
        if($sqlMcRecorder.qml_getPrintFlag()) console.log("page9")
        page_9EO_1LowCurrent.qmlSN_sqlWriteFinish()
        page_9EO_2shortCircuit.qmlSN_sqlWriteFinish()
        page5.qmlSN_sqlWriteFinish()
        page6.qmlSN_sqlWriteFinish()
    }

    signal qmlSN_returnMainPage()
    onQmlSN_returnMainPage: {sw.currentIndex = 0}

    signal qmlSN_changePage10Index(var var1)

    SwipeView
    {
        id:sw
        currentIndex: 0
        anchors.fill: parent
        interactive: false
        Component.onCompleted:{
            contentItem.highlightMoveDuration = 0       //将移动时间设为0
        }

        Item{
            GridLayout {
                id: gridLayout
                columnSpacing: 30
                rowSpacing: 16
                anchors.fill: parent
                rows: 3
                columns: 3

                property int textSize: Math.floor(30*main_screen.minSize)

                EXC_Normal_BtnUncheckStyle {
                    height: 61*main_screen.minSize
                    nameText: qsTr("小电流测试")
                    Layout.preferredWidth: parent.width*0.25
                    Layout.preferredHeight: parent.height*0.13
                    nameFontpixelSize: parent.textSize
                    Layout.leftMargin: parent.width*0.05
                    onClicked: sw.currentIndex = 1
                }

                EXC_Normal_BtnUncheckStyle {
                    height: 61*main_screen.minSize
                    nameText: qsTr("短路升流测试")
                    Layout.preferredWidth: parent.width*0.25
                    Layout.preferredHeight: parent.height*0.13
                    nameFontpixelSize: parent.textSize
                    onClicked: sw.currentIndex = 2
                }

                EXC_Normal_BtnUncheckStyle {
                    height: 61*main_screen.minSize
                    nameText: qsTr("零起升压测试")
                    Layout.preferredWidth: parent.width*0.25
                    Layout.preferredHeight: parent.height*0.13
                    nameFontpixelSize: parent.textSize
                    onClicked: qmlSN_toP3promotion()
                }

                EXC_Normal_BtnUncheckStyle {
                    height: 61*main_screen.minSize
                    nameText: qsTr("限制器模拟试验")
                    Layout.preferredWidth: parent.width*0.25
                    Layout.preferredHeight: parent.height*0.13
                    nameFontpixelSize: parent.textSize
                    Layout.leftMargin: parent.width*0.05
                    onClicked: sw.currentIndex = 3
                }

                EXC_Normal_BtnUncheckStyle {
                    height: 61*main_screen.minSize
                    nameText: qsTr("空载特性试验")
                    Layout.preferredWidth: parent.width*0.25
                    Layout.preferredHeight: parent.height*0.13
                    nameFontpixelSize: parent.textSize
                    onClicked: sw.currentIndex = 4
                }

                EXC_Normal_BtnUncheckSecret_programmerStyle {
                    height: 61*main_screen.minSize
                    nameText: qsTr("模拟量校核")
                    Layout.preferredWidth: parent.width*0.25
                    Layout.preferredHeight: parent.height*0.13
                    nameFontpixelSize: parent.textSize
                }

                EXC_Normal_BtnUncheckStyle {
                    height: 61*main_screen.minSize
                    nameText: qsTr("阶跃试验")
                    Layout.preferredWidth: parent.width*0.25
                    Layout.preferredHeight: parent.height*0.13
                    nameFontpixelSize: parent.textSize
                    Layout.leftMargin: parent.width*0.05
                    onClicked: sw.currentIndex = 5
                }

            }
        }
        Page_09EO_1LowCurrent {
            id: page_9EO_1LowCurrent
        }

        Page_09EO_2shortCircuit {
            id: page_9EO_2shortCircuit
        }

        Item{
            id: page_9EO_3Limiter
            Text {
                text: qsTr("限制器模拟动作")
                color: majorColor
                font.pointSize: 30
                anchors.top: parent.top
                anchors.topMargin: parent.height*0.05
                anchors.horizontalCenter: parent.horizontalCenter
            }

            GridLayout {
                //                id: page_9EO_3Limiterlayout
                anchors.top: parent.top
                anchors.topMargin: parent.height*0.1
                anchors.right: parent.right
                anchors.bottom: parent.bottom
                anchors.left: parent.left
                columnSpacing: 30
                rowSpacing: 30
                rows: 2
                columns: 2
                property int textSize: Math.floor(30*main_screen.minSize)

                EXC_Normal_BtnUncheckStyle {
                    width: 300*main_screen.minSize
                    height: 80*main_screen.minSize
                    Layout.preferredWidth: width
                    Layout.preferredHeight: height
                    nameText: qsTr("修改欠励限制")
                    nameFontpixelSize: parent.textSize
                    Layout.leftMargin: parent.width*0.1
                    onClicked: qmlSN_changePage10Index(7)
                }
                EXC_Normal_BtnUncheckStyle {
                    width: 300*main_screen.minSize
                    height: 80*main_screen.minSize
                    Layout.preferredWidth: width
                    Layout.preferredHeight: height
                    nameText: qsTr("修改过励限制")
                    nameFontpixelSize: parent.textSize
                    onClicked: qmlSN_changePage10Index(8)
                }
                EXC_Normal_BtnUncheckStyle {
                    width: 300*main_screen.minSize
                    height: 80*main_screen.minSize
                    Layout.preferredWidth: width
                    Layout.preferredHeight: height
                    nameText: qsTr("修改V/F限制")
                    nameFontpixelSize: parent.textSize
                    Layout.leftMargin: parent.width*0.1
                    onClicked: qmlSN_changePage10Index(9)
                }
                //                EXC_Normal_BtnUncheckStyle {
                //                    width: 300*main_screen.minSize
                //                    height: 50*main_screen.minSize
                //                    Layout.preferredWidth: width
                //                    Layout.preferredHeight: height
                //                    nameText: qsTr("修改定子电流限制")
                //                    nameFontpixelSize: parent.textSize
                //                    onClicked: qmlSN_changePage10Index(10)
                //                }
            }
        }

        Page_09EO_5NoloadProperty{id:page5}

        Page_09EO_6phaseStep{id:page6}
    }
}

/*##^##
Designer {
    D{i:0;autoSize:true;height:480;width:640}
}
##^##*/
